CPU 686
BITS 32

%define PIC1_CMD 0x20
%define EOI 0x20
%define DATA_REG 0x60

global _kbc_handler_queue
extern _queuePut
extern _q

section .text

_kbc_handler_queue:

pusha

XOR EAX,EAX
XOR ECX, ECX

in al, DATA_REG
push EAX
mov ECX, _q
push  ECX
call _queuePut
add SP, 8
mov al, EOI
out PIC1_CMD, al

popa
iretd

END